import { $rp } from '@/utils/constants';
import WebAdmin from '@/components/web_admin';
import ApplicationForPublicSpaces from '@/components/web_admin/application_for_public_spaces/Index';
import ApplicationForPublicSpacesShow from '@/components/web_admin/application_for_public_spaces/Show';
import Announcements from '@/components/announcement/Index';
import Communities from '@/components/web_admin/communities/index';
import PopularizeInfo from '@/components/web_admin/popularize_info';

export default [
  {
    path: `/${$rp.ADMIN}`,
    component: WebAdmin,
    meta: { sidebar: true },
    children: [
      {
        path: $rp.ANNOUNCEMENTS,
        alias: '',
        component: Announcements,
      },
      {
        path: $rp.COMMUNITIES,
        component: Communities,
      },
      {
        path: $rp.APPLICATION_FOR_PUBLIC_SPACES,
        component: ApplicationForPublicSpaces,
      },
      {
        path: 'popularize_info',
        component: PopularizeInfo,
        name: PopularizeInfo.name,
      },
    ],
  },
  {
    path: `/${$rp.APPLICATION_FOR_PUBLIC_SPACES}/:applyId`,
    component: ApplicationForPublicSpacesShow,
  },
];
